<template>
	<view class="container">
		
		<view class="list-cell m-t">
			<text class="cell-tit">消息推送</text>
			<switch checked color="#fa436a" />
		</view>
		<view class="list-cell m-t b-b" @click="$u.func.route('/pages/set/help')" hover-class="cell-hover" :hover-stay-time="50">
			<text class="cell-tit">帮助中心</text>
			<text class="cell-more yticon icon-you"></text>
		</view>
		<view class="list-cell b-b" @click="$u.func.route('/pages/set/about')" hover-class="cell-hover" :hover-stay-time="50">
			<text class="cell-tit">关于谊德</text>
			<text class="cell-more yticon icon-you"></text>
		</view>
    <view class="list-cell b-b m-t"  hover-class="cell-hover" :hover-stay-time="50">
			<text class="cell-tit">服务协议</text>
			<text class="cell-more yticon icon-you"></text>
		</view>
		<view class="list-cell b-b"  hover-class="cell-hover" :hover-stay-time="50">
			<text class="cell-tit">隐私条款</text>
			<text class="cell-more yticon icon-you"></text>
		</view>

		<view class="list-cell b-b" hover-class="cell-hover" :hover-stay-time="50">
			<text class="cell-tit" @click="onAPPUpdate">检查新版本</text>
			<view class="cell-tip">当前版本 <text v-text="versionName"></text></view>
			<text class="cell-more yticon icon-you"></text>
		</view>


	</view>
</template>

<script>

// #ifdef APP-PLUS
import APPUpdate, { getCurrentNo } from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
// #endif
import bqieInput from '@/components/aqie/bqie-input'
    export default {
        components: {bqieInput},
		data() {
			return {
				input4:'',
				versionName: "1.0.0"
			};
		},
		onLoad(){
			this.getVersionName()
		},
		methods:{
			getVersionName() {
				// #ifdef APP-PLUS
				getCurrentNo(res => {
					this.versionName = res.versionName
				});
				// #endif
				// #ifndef APP-PLUS
				uni.showToast({
					title:"请在APP环境使用",
					icon:"none"
				});
				// #endif
			},
			onAPPUpdate(){
				// #ifdef APP-PLUS
				// true 在出现无新版本的情况下，有弹窗提示
				// false 无提示（一般在APP.vue使用）
				APPUpdate(true);
				// #endif
				// #ifndef APP-PLUS
				uni.showToast({
					title:"请在APP环境使用",
					icon:"none"
				});
				// #endif
			},
		}
	}
</script>

<style lang='scss'>
	page{
		background: #101334;
    color:aliceblue;
	}
	.list-cell{
		display:flex;
		align-items:baseline;
		padding: 20upx $page-row-spacing;
		line-height:60upx;
		position:relative;
		background: #151e3d;
		justify-content: center;
		&.log-out-btn{
			margin-top: 40upx;
			.cell-tit{
				color: aliceblue;
				text-align: center;
				margin-right: 0;
			}
		}
		&.cell-hover{
			background:#101334;
		}
		&.b-b:after{
			left: 30upx;
		}
		&.m-t{
			margin-top: 16upx; 
		}
		.cell-more{
			align-self: baseline;
			font-size:$font-lg;
			color:aliceblue;
			margin-left:10upx;
		}
		.cell-tit{
			flex: 1;
			font-size: $font-base + 2upx;
			color: aliceblue;
			margin-right:10upx;
		}
		.cell-tip{
			font-size: $font-base;
			color: aliceblue;
		}
		switch{
			transform: translateX(16upx) scale(.84);
		}
	}

>>> .input-box{
.input-swiper{
	input {
	background-color: green !important;
}
}
}

	.input6 {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: white;
    padding-left: 10px;
    background: #8D6BFF;
  }
</style>
